EC-CUBE 2.4.4
[ class tree: EC-CUBE 2.4.4 ] [ index: EC-CUBE 2.4.4 ] [ all elements ]

Source for file SC_CampaignSession.php

Documentation is available at SC_CampaignSession.php

  1. <?php
  2. /*
  3.  * This file is part of EC-CUBE
  4.  *
  5.  * Copyright(c) 2000-2010 LOCKON CO.,LTD. All Rights Reserved.
  6.  *
  7.  * http://www.lockon.co.jp/
  8.  *
  9.  * This program is free software; you can redistribute it and/or
  10.  * modify it under the terms of the GNU General Public License
  11.  * as published by the Free Software Foundation; either version 2
  12.  * of the License, or (at your option) any later version.
  13.  *
  14.  * This program is distributed in the hope that it will be useful,
  15.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17.  * GNU General Public License for more details.
  18.  *
  19.  * You should have received a copy of the GNU General Public License
  20.  * along with this program; if not, write to the Free Software
  21.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  22.  */
  23.  
  24. /* キャンペーン管理クラス */
  25.     var $key;
  26.     var $campaign_id = 'campaign_id';
  27.     var $is_campaign = 'is_campaign';
  28.     var $campaign_dir = 'campaign_dir';
  29.  
  30.     /* コンストラクタ */
  31.     function SC_CampaignSession($key "campaign"{
  32.         SC_Utils_Ex::sfDomainSessionStart();
  33.         $this->key = $key;
  34.     }
  35.  
  36.     /* キャンペーンIDをセット */
  37.     function setCampaignId($campaign_id{
  38.         $_SESSION[$this->key][$this->campaign_id$campaign_id;
  39.     }
  40.  
  41.     /* キャンペーンIDを取得 */
  42.     function getCampaignId({
  43.         return $_SESSION[$this->key][$this->campaign_id];
  44.     }
  45.  
  46.     /* キャンペーンページからの遷移情報を保持 */
  47.     function setIsCampaign({
  48.         $_SESSION[$this->key][$this->is_campaigntrue;
  49.     }
  50.  
  51.     /* キャンペーンページからの遷移情報を取得 */
  52.     function getIsCampaign({
  53.         return isset($_SESSION[$this->key][$this->is_campaign]$_SESSION[$this->key][$this->is_campaignfalse;
  54.     }
  55.  
  56.     /* キャンペーン情報を削除 */
  57.     function delCampaign({
  58.         unset($_SESSION[$this->key]);
  59.     }
  60.  
  61.     /* キャンペーンディレクトリ名をセット */
  62.     function setCampaignDir($campaign_dir{
  63.         $_SESSION[$this->key][$this->campaign_dir$campaign_dir;
  64.     }
  65.  
  66.     /* キャンペーンディレクトリ名を取得 */
  67.     function getCampaignDir({
  68.         return isset($_SESSION[$this->key][$this->campaign_dir])
  69.                 ? $_SESSION[$this->key][$this->campaign_dir"";
  70.     }
  71.  
  72.     /* キャンペーンページならフレームを変更 */
  73.     function pageView($objView$site_frame SITE_FRAME{
  74.         $self_path explode("/",$_SERVER['PHP_SELF']);
  75.         $campaign_dir explode("/",CAMPAIGN_DIR);
  76.         
  77.         $is_campaign array_search$campaign_dir[0$self_path );
  78.         
  79.         ifstrlen($is_campaign{
  80.             $objView->display($site_frame);
  81.         else {
  82.             $objView->display($site_frame);
  83.         }
  84.     }
  85. }
  86. ?>

Documentation generated on Fri, 24 Feb 2012 13:59:58 +0900 by Seasoft